{% import '@SyliusAdmin/shared/helper/button.html.twig' as button %}

{% set configuration = hookable_metadata.context.configuration %}

{% set fallback_url = app.request.headers.get('referer')|default(sylius_generate_redirect_path(path(
    configuration.vars.index.route.name|default(configuration.getRouteName('index')),
    configuration.vars.index.route.parameters|default(configuration.vars.route.parameters|default({}))
))) %}

{{ button.cancel(sylius_test_form_attribute('cancel-changes-button')|merge({
    text: 'sylius.ui.back'|trans,
    class: 'btn',
    fallback_url: fallback_url
})) }}
